package com.warmheart.builder.user;

import com.warmheart.core.co.base.BaseCoBuilder;
import com.warmheart.core.co.oper.Co;
import com.warmheart.entity.user.UserRole;

/**
 * 
 * @ClassName: UserRole
 * @Description: 角色实体CoBuilder类，对应表名称为tb_user_role
 *               温馨提示：不要修改该实体CoBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午13:05:35
 *
 */
public class UserRoleCoBuilder extends BaseCoBuilder<UserRole, UserRoleCoBuilder> {

    private final UserRole t;

    @Override
    protected UserRoleCoBuilder self() {
        return this;
    }

    @Override
    public UserRole core() {
        return this.t;
    }

    public UserRoleCoBuilder(UserRole userRole) {
        t = userRole;
    }

    /**
     * 角色名称
     */
    private Co<UserRole, UserRoleCoBuilder> name;

    /**
     * 角色编码
     */
    private Co<UserRole, UserRoleCoBuilder> code;

    /**
     * 角色描述
     */
    private Co<UserRole, UserRoleCoBuilder> description;

    /**
     * 是否系统角色
     */
    private Co<UserRole, UserRoleCoBuilder> state;

    public Co<UserRole, UserRoleCoBuilder> name() {
        if (this.name == null) {
            this.name = new Co<UserRole, UserRoleCoBuilder>(self(), "name");
        }
        return this.name;
    }

    public Co<UserRole, UserRoleCoBuilder> code() {
        if (this.code == null) {
            this.code = new Co<UserRole, UserRoleCoBuilder>(self(), "code");
        }
        return this.code;
    }

    public Co<UserRole, UserRoleCoBuilder> description() {
        if (this.description == null) {
            this.description = new Co<UserRole, UserRoleCoBuilder>(self(), "description");
        }
        return this.description;
    }

    public Co<UserRole, UserRoleCoBuilder> state() {
        if (this.state == null) {
            this.state = new Co<UserRole, UserRoleCoBuilder>(self(), "state");
        }
        return this.state;
    }
}